#ifndef POST_SCENE_H
#define POST_SCENE_H

#include "Scene.h"
#include "Entity3D.h"
#include <stdio.h>
#include "Camera.h"

#include <Cg/cg.h>
#include <Cg/cgD3D9.h>

#pragma comment( lib, "cg.lib" )
#pragma comment( lib, "cgD3D9.lib" )

extern CGprogram postFragment;
extern CGparameter renderTexture;
extern LPDIRECT3DTEXTURE9 pRenderTexture;

extern CUSTOMVERTEX OurVertices[24];
extern short indices[36];



class PostScene : public Scene
{
private:


	LPDIRECT3DVERTEXBUFFER9 v_buffer; //vertex buffer
	LPDIRECT3DINDEXBUFFER9 i_buffer;

	LPD3DXBUFFER materialBuffer;
	LPD3DXMESH mesh;
	DWORD numMaterials;

	D3DXMATERIAL * d3dxPlaneMaterials;
	D3DMATERIAL9 * meshPlaneMaterials;
	LPDIRECT3DTEXTURE9 * meshPlaneTextures;
	
	Entity3D cameraPlane;

public:
	PostScene(LPDIRECT3DDEVICE9 _d3ddev);
	void LoadContent(LPDIRECT3DDEVICE9 _d3ddev);
	void Draw(LPDIRECT3DDEVICE9 _d3ddev);
	void Update(DWORD dt);
	void HandleInput(InputManager * _input);
	void Init();
	~PostScene();
};

#endif